Skip to content

feat(php): support extension install via PIE#28772

Open
bshaffer wants to merge 1 commit into
protocolbuffers:mainfrom
bshaffer:pie-support
Open

feat(php): support extension install via PIE#28772
bshaffer wants to merge 1 commit into
protocolbuffers:mainfrom
bshaffer:pie-support

Conversation

@bshaffer

@bshaffer bshaffer commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

addresses #21808 by adding a workflow to sync the PHP extension to a subrepo. After this PR is merged, we will need to:

  • create the repo protocolbuffers/protobuf-php-ext,
  • submit that repo to packagist.org after it is tagged.

Users will then be able to install the protobuf extension using pie instead of pecl:

pie install google/protobuf-ext

New

  • php/ext/google/protobuf/README.md: Readme for the mirrored google/protobuf-ext PIE extension package explaining installation (pie install google/protobuf-ext) and redirecting issues/PRs to the main repository.
  • php/ext/google/protobuf/composer.json: Package metadata for the PIE PHP extension
  • php/ext/google/protobuf/package_mirror.py: Python script that copies and structures C extension source files (*.c, *.h, *.inc, *.m4, *.w32, composer.json, README.md, LICENSE) along with required third_party/utf8_range dependencies into a target mirror directory.
  • php/ext/google/protobuf/test_pie_package.sh: Test script that downloads pie.phar, populates a temporary local repository using package_mirror.py, adds it via pie repository:add path, and executes pie build google/protobuf-ext:@dev.

Modified

  • .github/workflows/update_php_repo.yml: Added the update-php-ext-repo job to automatically sync C extension files to protocolbuffers/protobuf-php-ext

See grpc/grpc#42784 for similar work done for the gRPC extension

@bshaffer
bshaffer requested a review from a team as a code owner July 23, 2026 15:15
@bshaffer
bshaffer requested review from mkruskal-google and removed request for a team July 23, 2026 15:15
@shaod2 shaod2 added php 🅰️ safe for tests Mark a commit as safe to run presubmits over labels Jul 23, 2026
@github-actions github-actions Bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants